import { useState } from "react"
import PropTypes from "prop-types"
import "./table.css"
const List = (props) => {
    //方法
    const [ncount]=useState(()=>{
        return props.list_num
    })
    //页面
    return(
            <div>
                {
                    props.list_num.map((item,index)=>{
                        return(
                                <div className="list_list" key={index}>
                                    <div>
                                        <span>
                                            日期：
                                        </span>
                                    {item.data}
                                  
                                    </div>
                                    <div>
                                        <span>
                                            标题：
                                        </span>
                                          {item.titile}
                                    </div>
                                    <div>
                                        <span>
                                           优先级： 
                                        </span>
                                        {item.check}
                                    </div>
                                </div>
                        )
                    })
                }
            </div>
    )
}

   
List.propTypes = { list_num: PropTypes.array.isRequired} 
export default List;